đ Don't show âexpected nothingâ if root type cannot be resolved#1940
đ Don't show âexpected nothingâ if root type cannot be resolved#1940NeunEinser wants to merge 1 commit intoSpyglassMC:mainfrom
Conversation
|
This can be tested by deleting the |
|
Thinking more about this, it could also make sense to default unresolved symbols in general to It is reasonable to assume either something with the definition is amiss, or data is missing / not loaded correctly. All these cases indicate an error elsewhere, outside of the file that is currently being validated. Defaulting to a kind of âanything goesâ type in these cases in general could actually make a lot of sense. |
Work towards #1938
With this change, in case the root type the mcdoc runtime checker is called with cannot be resolved, the
anytype will be used instead of empty union.Usually in case something is not able to be resolved, an empty union is emitted, causing an âexpected notingâ error. In case this happens for the type runtime checker is called with, this will be replaced by the
anytype. Calling the runtime checker explicitly with an empty union will still produce âexpected notingâ, and in case a type that is referenced later cannot be resolved, âexpected nothingâ would still be emitted.This disables all validations and completions for this case in a graceful way.